Video decoding apparatus and video coding apparatus

ABSTRACT

A video decoding apparatus includes: a matrix reference pixel derivation unit configured to derive, as a reference image, an image obtained by down-sampling an image adjacently above a target block and an image adjacently leftward of the target block; a weight matrix derivation unit configured to derive a matrix of weighting factors in accordance with an intra prediction mode and a target block size; a matrix prediction image derivation unit configured to derive a prediction image by using a product of elements of the reference image and elements of the matrix of the weighting factors; and a matrix prediction image interpolation unit deriving, as a prediction image, the prediction image or an image obtained by interpolating the prediction image, wherein the weight matrix derivation unit derives a matrix with a size of a width equal to or smaller than a width of the target block size and a height equal to or smaller than a height of the target block size.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of priority to Japanese PatentApplication Numbers 2019-169444 and 2019-171549 filed on Sep. 18, 2019and Sep. 20, 2019, respectively. The entire contents of each of theabove-identified applications are hereby incorporated by reference.

BACKGROUND Technical Field

Embodiments of the present disclosure relate to a video decodingapparatus and a video coding apparatus.

A video coding apparatus which generates coded data by coding a video,and a video decoding apparatus which generates decoded images bydecoding the coded data are used for efficient transmission or recordingof videos.

Examples of specific video coding schemes include schemes proposed inH.264/AVC and High-Efficiency Video Coding (HEVC).

In such a video coding scheme, images (pictures) constituting a videoare managed in a hierarchical structure including slices obtained bysplitting an image, Coding Tree Units (CTUs) obtained by splitting aslice, units of coding (Coding Units; which may be referred to as CUs)obtained by splitting a coding tree unit, and Transform Units (TUs)obtained by splitting a coding unit, and are coded/decoded for each CU.

In such a video coding scheme, usually, a prediction image is generatedbased on a local decoded image that is obtained by coding/decoding aninput image (a source image), and prediction errors (which may bereferred to also as “difference images” or “residual images”) obtainedby subtracting the prediction image from the input image are coded.Generation methods of prediction images include an inter-pictureprediction (an inter-prediction) and an intra-picture prediction (intraprediction).

An example of a recent technology for video coding and decoding is“Versatile Video Coding (Draft 6)”, JVET-02001-vE, Joint VideoExploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG11. In “CE 3: Affine linear weighted intra prediction (CE3-4.1,CE3-4.2)”, JVET-N0217-v1, Joint Video Exploration Team (JVET) of ITU-TSG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, a Matrix-based IntraPrediction (MIP) technology is disclosed in which a prediction image isderived by a product-sum operation performed on a weight matrix and areference image derived from an adjacent image.

SUMMARY

In matrix intra predictions such as “Versatile Video Coding (Draft 6)”,JVET-02001-vE, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3and ISO/IEC JTC 1/SC 29/WG 11, and “CE3: Affine linear weighted intraprediction (CE3-4.1, CE3-4.2)”, JVET-N0217-v1, Joint Video ExplorationTeam (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, differentweight Matrices are held depending on the size of multiple blocks and anintra prediction mode, and thus there is a problem in that a memoryholding the weight matrices has a large size. There is also a problem inthat the amount of processing for generating the prediction image islarge.

An object of the present disclosure is to perform preferable intraprediction while reducing the size of the memory for the weightingmatrices, and to reduce the amount of processing.

In order to solve the above problem, a video decoding apparatusaccording to an aspect of the present disclosure includes: a matrixreference pixel derivation unit configured to derive, as a referenceimage, an image obtained by down-sampling an image adjacently above atarget block and an image adjacently leftward of the target block; aweight matrix derivation unit configured to derive a matrix of weightingfactors in accordance with an intra prediction mode and a target blocksize; a matrix prediction image derivation unit configured to derive aprediction image by using a product of elements of the reference imageand elements of the matrix of the weighting factors; and a matrixprediction image interpolation unit deriving, as a prediction image, theprediction image or an image obtained by interpolating the predictionimage, wherein the weight matrix derivation unit derives a matrix with asize of a width equal to or smaller than a width of the target blocksize and a height equal to or smaller than a height of the target blocksize.

The weight matrix derivation unit derives a matrix with a size of 4×4 ina case that one side of the target block is 4.

The weight matrix derivation unit derives a matrix with a size of 4×4 ina case that the target block size is 4×16 and in a case that the targetblock size is 16×4.

The weight matrix derivation unit derives one of a matrix with a size of4×4 and sizeId=0, 1 and a matrix with a size of 8×8 and sizeId=2, andderives a matrix with sizeId=1 or 2 in a case that one side of thetarget block is 4.

The weight matrix derivation unit may derive a matrix with a size of 4×4in a case that a product of a width and a height of the target blocksize is equal to or smaller than 64.

The matrix prediction image derivation unit derives an intermediateprediction image predMip [ ][ ] shaped in a square whose width andheight are equal.

A video coding apparatus includes: a matrix reference pixel derivationunit configured to derive, as a reference image, an image obtained bydown-sampling an image adjacently above a target block and an imageadjacently leftward of the target block; a weight matrix derivation unitconfigured to derive a matrix of weighting factors in accordance with anintra prediction mode and a target block size; a matrix prediction imagederivation unit configured to derive a prediction image by using aproduct of elements of the reference image and elements of the matrix ofthe weighting factors; and a matrix prediction image interpolation unitderiving, as a prediction image, the prediction image or an imageobtained by interpolating the prediction image, wherein the weightmatrix derivation unit derives a matrix with a size of a width equal toor smaller than a width of the target block size and a height equal toor smaller than a height of the target block size.

The weight matrix derivation unit derives a matrix with a size of 4×4 ina case that one side of the target block is 4.

The weight matrix derivation unit derives a matrix with a size of 4×4 ina case that the target block size is 4×16 and in a case that the targetblock size is 16×4.

The weight matrix derivation unit derives one of a matrix with a size of4×4 and sizeId=0, 1 and a matrix with a size of 8×8 and sizeId=2, andderives a matrix with sizeId=1 or 2 in a case that one side of thetarget block is 4.

The weight matrix derivation unit may derive a matrix with a size of 4×4in a case that a product of a width and a height of the target blocksize is equal to or smaller than 64.

The matrix prediction image derivation unit derives an intermediateprediction image predMip [ ][ ] shaped in a square whose width andheight are equal.

According to one aspect of the present disclosure, a preferable intraprediction can be performed with a reduction in the size of the memoryfor the weight matrix or a reduction of the amount of processing.

BRIEF DESCRIPTION OF DRAWINGS

The disclosure will be described with reference to the accompanyingdrawings, wherein like numbers reference like elements.

FIG. 1 is a schematic diagram illustrating a configuration of an imagetransmission system according to the present embodiment.

FIG. 2 is a diagram illustrating configurations of a transmittingapparatus equipped with a video coding apparatus and a receivingapparatus equipped with a video decoding apparatus according to thepresent embodiment. PROD_A denotes the transmitting apparatus equippedwith the video coding apparatus, and PROD_B denotes the receivingapparatus equipped with the video decoding apparatus.

FIG. 3 is a diagram illustrating configurations of a recording apparatusequipped with the video coding apparatus and a reconstruction apparatusequipped with the video decoding apparatus according to the presentembodiment. PROD_C denotes the recording apparatus equipped with thevideo coding apparatus, and PROD_D denotes the reconstruction apparatusequipped with the video decoding apparatus.

FIG. 4 is a diagram illustrating a hierarchical structure of data of acoding stream according to the present embodiment.

FIG. 5 is a diagram illustrating a split example of the CTU.

FIG. 6 is a schematic diagram indicating types (mode numbers) of anintra prediction mode.

FIG. 7 is a schematic diagram illustrating a configuration of the videodecoding apparatus.

FIG. 8 is a schematic diagram illustrating a configuration of an intraprediction parameter decoder.

FIG. 9 is a diagram illustrating a reference region used for intraprediction.

FIG. 10 is a diagram illustrating a configuration of an intra predictionimage generation unit.

FIG. 11 is a diagram illustrating an example of MIP processing.

FIG. 12 is a diagram illustrating an example of MIP processing.

FIG. 13 is a block diagram illustrating a configuration of the videocoding apparatus.

FIG. 14 is a schematic diagram illustrating a configuration of an intraprediction parameter coder.

FIG. 15 is a diagram illustrating details of an MIP unit.

FIG. 16 is a diagram illustrating MIP processing according to thepresent embodiment.

FIG. 17 is a diagram illustrating parameters for prediction imagegeneration in a case that deriving predMip with a non-square by usingMIP.

FIG. 18 is a diagram illustrating a method for deriving sizeId accordingto an embodiment of the present disclosure (MIP Example 1).

FIG. 19 is a diagram illustrating parameters for prediction imagegeneration in a case that a square predMip is derived by using MIP.

FIG. 20 is a diagram illustrating a method for deriving sizeId accordingto an embodiment of the present disclosure (MIP Example 2).

FIG. 21 is a diagram illustrating a method for deriving sizeId accordingto an embodiment of the present disclosure (MIP Example 3).

FIG. 22 is a diagram illustrating a method for deriving sizeId accordingto an embodiment of the present disclosure (MIP Example 4).

DESCRIPTION OF EMBODIMENTS First Embodiment

Hereinafter, embodiments of the present disclosure will be describedwith reference to the drawings.

FIG. 1 is a schematic diagram illustrating a configuration of an imagetransmission system 1 according to the present embodiment.

The image transmission system 1 is a system transmitting a coding streamobtained by coding an image to be coded, decoding the transmitted codingstream, and display an image. The image transmission system 1 includes avideo coding apparatus (image coding apparatus) 11, a network 21, avideo decoding apparatus (image decoding apparatus) 31, and a videodisplay apparatus (image display apparatus) 41.

An image T is input to the video coding apparatus 11.

The network 21 transmits, to the video decoding apparatus 31, a codingstream Te generated by the video coding apparatus 11. The network 21 isthe Internet, a Wide Area Network (WAN), a Local Area Network (LAN), ora combination thereof. The network 21 is not necessarily limited to abidirectional communication network, and may be a unidirectionalcommunication network configured to transmit broadcast waves of digitalterrestrial television broadcasting, satellite broadcasting of the like.The network 21 may be substituted by a storage medium in which thecoding stream Te is recorded, such as a Digital Versatile Disc (DVD,trade name) or a Blue-ray Disc (BD, trade name).

The video decoding apparatus 31 decodes each of the coding streams Tetransmitted by the network 21 and generates one or more decoded imagesTd.

The video display apparatus 41 displays all or part of the one or moredecoded images Td generated by the video decoding apparatus 31. Thevideo display apparatus 41 includes a display device, for example, aliquid crystal display or an organic Electro-luminescence (EL) display.Forms of display include a stationary display, a mobile display, an HMD,and the like. The video decoding apparatus 41 displays images with highimage quality in a case that the video decoding apparatus 31 has highprocessing capability, and displays images not requiring high processingcapability or display capability in a case that the video decodingapparatus 31 has only low processing capability.

Operator

Operators used in the present specification will be described below.

-   -   >> is a right bit shift, << is a left bit shift, & is a bitwise        AND, | is a bitwise OR, |= is an OR assignment operator, and ∥        is a logical OR.    -   x ? y: z is a ternary operator to take y in a case that x is        true (other than 0) and take z in a case that x is false (0).    -   Clip3(a, b, c) is a function that clips c to a value equal to or        greater than a and equal to or smaller than b, returns a in a        case that c<a, returns b in a case that c>b, and returns c in        other cases (provided that a<=b).    -   Clip1Y(c) is an operator set to a=0 and b=(1<BitDepthY)−1 in a        Clip3(a, b, c). BitDepthY is the bit depth of luminance.    -   abs(a) is a function that returns the absolute value of a.    -   Int(a) is a function that returns an integer value of a.    -   floor(a) is a function that returns a maximum integer equal to        or smaller than a.    -   ceil(a) is a function that returns a minimum integer equal to or        greater than a.    -   a/d represents the division of a by d (with fractional portions        omitted).    -   min(a, b) is a function that returns the smaller of the values a        and b.

Structure of Coding Stream Te

Prior to the detailed description of the video coding apparatus 11 andthe video decoding apparatus 31 according to the present embodiment, adata structure of the coding stream Te generated by the video codingapparatus 11 and decoded by the video decoding apparatus 31 will bedescribed.

FIG. 4 is a diagram illustrating a hierarchical structure of data of thecoding stream Te. The coding stream Te includes a sequence and multiplepictures constituting the sequence illustratively. FIG. 4 illustrates adiagram illustrating a coding video sequence defining a sequence SEQ, acoding picture prescribing a picture PICT, a coding slice prescribing aslice S, a coding slice data prescribing slice data, a coding tree unitincluded in the coding slice data, and a coding unit (CU) included ineach coding tree unit, respectively.

Coding Video Sequence

For the coding video sequence, a set of data is defined that isreferenced by the video decoding apparatus 31 to decode the sequence SEQto be processed. As illustrated in the coding video sequence of FIG. 4,the sequence SEQ includes a Video Parameter Set, a Sequence ParameterSet SPS, a Picture Parameter Set PPS, a picture PICT, and SupplementalEnhancement Information SEI.

In the video parameter set VPS, in a video including multiple layers, aset of coding parameters common to multiple videos and a set of codingparameters associated with the multiple layers and an individual layerincluded in the video are defined.

For the sequence parameter set SPS, a set of coding parameters isdefined that is referenced by the video decoding apparatus 31 to decodea target sequence. For example, a width and a height of a picture aredefined. Note that multiple SPSs may exist. In that case, any ofmultiple SPSs is selected from the PPS.

For the picture parameter set PPS, a set of coding parameters is definedthat is referenced by the video decoding apparatus 31 to decode eachpicture in a target sequence. For example, a reference value(pic_init_qp_minus26) of a quantization step size used for decoding of apicture and a flag (weighted_pred_flag) indicating an application of aweighted prediction are included. Note that multiple PPSs may exist. Inthat case, any of multiple PPSs is selected from each picture in atarget sequence.

Coding Picture

For the coding picture, a set of data is defined that is referenced bythe video decoding apparatus 31 to decode the picture PICT to beprocessed. As illustrated in the coding picture in FIG. 4, the picturePICT includes slices 0 to NS-1 (NS is the total number of slicesincluded in the picture PICT).

Note that, in the description below, in a case that the slices 0 to NS-1need not be distinguished from one another, subscripts of referencesigns may be omitted. The same applies to other data with subscriptsincluded in the coding stream Te which will be described below.

Coding Slice

For the coding slice, a set of data is defined that is referenced by thevideo decoding apparatus 31 to decode the slice S to be processed. Asillustrated in the coding slice in FIG. 4, the slice includes a sliceheader and slice data.

The slice header SH includes a coding parameter group referenced by thevideo decoding apparatus 31 to determine a decoding method for a targetslice. Slice type specification information (slice_type) indicating aslice type is one example of a coding parameter included in the sliceheader.

Examples of slice types that can be specified by the slice typespecification information include (1) I slice using only an intraprediction in coding, (2) P slice using a unidirectional prediction oran intra prediction in coding, and (3) B slice using a unidirectionalprediction, a bidirectional prediction, or an intra prediction incoding, and the like. Note that the inter prediction is not limited to auni-prediction or a bi-prediction and may generate a prediction imageusing more reference pictures. Hereinafter, references of a P slice anda B slice indicate slices including blocks for which the interprediction can be used.

Note that, the slice header may include a reference to the pictureparameter set PPS (pic_parameter_set_id).

Coding Slice Data

For the coding slice data, a set of data is defined that is referencedby the video decoding apparatus 31 to decode slice data to be processed.The slice data includes a CTU, as illustrated in the coding slice headerin FIG. 4. A CTU is a block of a fixed size (for example, 64×64)constituting a slice, and may be called a Largest Coding Unit (LCU).

Coding Tree Unit

For the coding tree unit in FIG. 4, a set of data is defined that isreferenced by the video decoding apparatus 31 to decode a CTU to beprocessed. The CTU is split into coding units CU, which are basic unitsof coding processing, by recursive Quad Tree split (QT split), BinaryTree split (BT split) or Ternary Tree split (TT split). The BT split andthe TT split are collectively referred to as a Multi Tree split (MTsplit). Nodes of a tree structure obtained by recursive quad tree splitare referred to as Coding Nodes (CNs). Intermediate nodes of a quadtree, a binary tree, and a ternary tree are coding nodes, and the CTUitself is also defined as the highest coding node.

CT is the CT information, a QT split flag (cu_split_flag) indicatingwhether to perform QT split or not, an MT split flag (split_mt_flag)indicating the presence or absence of MT split, an MT split direction(split_mt_dir) indicating the split direction of the MT split, and an MTsplit type (split_mt_type) indicating the MT split type. cu_split_flag,split_mt_flag, split_mt_dir, and split_mt_type are transmitted for eachcoding node.

In a case that cu_split_flag is 1, the coding node is split into fourcoding nodes (QT in FIG. 5).

In cu_split_flag being 0, in a case that split_mt_flag is 0, the codingnode is not split and includes one coding unit CU as a node (split inFIG. 5 is not performed). The CU is a terminal node of the coding nodesand is not split any further. The CU is a basic unit of codingprocessing.

In a case that split_mt_flag is 1, the coding node is subjected to MTsplit as follows. In split_mt_type being 0, in a case that split_mt_diris 1, the coding node is horizontally split into two coding nodes (BT(horizontal split) in FIG. 5). In a case that split_mt_dir is 0, thecoding node is vertically split into two coding nodes (BT (verticalsplit) in FIG. 5). In split_mt_type being 1, in a case that split_mt_diris 1 (TT (horizontal split) in FIG. 5), the coding node is horizontallysplit into three coding nodes. In a case that split_mt_dir is 0, thecoding node is vertically split into three coding nodes (TT (verticalsplit) in FIG. 5). These are illustrated in the CT information of FIG.5.

In a case that the size of the CTU is 64×64 pixels, the size of the CUcan take any of 64×64 pixels, 64×32 pixels, 32×64 pixels, 32×32 pixels,64×16 pixels, 16×64 pixels, 32×16 pixels, 16×32 pixels, 16×16 pixels,64×8 pixels, 8×64 pixels, 32×8 pixels, 8×32 pixels, 16×8 pixels, 8×16pixels, 8×8 pixels, 64×4 pixels, 4×64 pixels, 32×4 pixels, 4×32 pixels,16×4 pixels, 4×16 pixels, 8×4 pixels, 4×8 pixels, and 4×4 pixels.

Coding Unit

As illustrated in the coding unit in FIG. 4, a set of data is definedthat is referenced by the video decoding apparatus 31 to decode thecoding unit to be processed. Specifically, the CU includes a CU headerCUH, a prediction parameter, a conversion parameter, a quantizationtransform coefficient, and the like. For the CU header, a predictionmode, and the like are defined.

The prediction processing may be performed in units of CUs or in unitsof sub-CUs into which the CU is further split. In a case that the sizeof the CU is equal to the size of the sub-CU, the number of sub-CUs inthe CU is one. In a case that the size of the CU is larger than thesub-CU size, the CU is split into sub-CUs. For example, in a case thatthe CU is 8×8 and the sub-CU is 4×4, the CU is split into four sub-CUsincluding two horizontal sub-CUs and two vertical sub-CUs.

There are two types of prediction (prediction modes): intra predictionand inter prediction. The intra prediction refers to a prediction in anidentical picture, and the inter prediction refers to predictionprocessing performed between different pictures (for example, betweenpictures of different display times, and between pictures of differentlayer images).

Conversion and quantization processing are performed in units of CUs,and a quantization transform coefficient may be entropy-coded in unitsof sub-blocks such as 4×4.

Prediction Parameter

The prediction image is derived based on a prediction parameterassociated with the block. The prediction parameter is classified into aprediction parameter for intra prediction and a prediction parameter forinter prediction.

The prediction parameter for intra prediction (intra predictionparameter) will be described below. The intra prediction parameterincludes a luminance prediction mode IntraPredModeY and a chrominanceprediction mode IntraPredModeC. FIG. 6 is a schematic diagram indicatingtypes (mode numbers) of intra prediction modes. As illustrated in FIG.6, there are, for example, 67 types (0 to 66) of intra prediction modes.The intra prediction modes include, for example, a planar prediction(0), a DC prediction (1), and Angular predictions (2 to 66).Furthermore, for chrominance, LM modes (67 to 72) may be added.

Syntax components for deriving the intra prediction parameter include,for example, intra_luma_mpm_flag, intra_luma_mpm_idx,intra_luma_mpm_remainder, and the like.

MPM

intra_luma_mpm_flag is a flag indicating whether IntraPredModeY of atarget block matches a Most Probable Mode (MPM). The MPM is a predictionmode included in an MPM candidate list mpmCandList [ ]. The MPMcandidate list is a list that stores candidates that are estimated to belikely to be applied to the target block from the intra prediction modeof the adjacent block and a prescribed intra prediction mode. In a casethat intra_luma_mpm_flag is 1, the IntraPredModeY of the target block isderived by using the MPM candidate list and the indexintra_luma_mpm_idx.

IntraPredModeY=mpmCandList[intra_luma_mpm_idx] REM

In a case that the intra_luma_mpm_flag is 0, the intra prediction modeis selected from the remaining modes RemIntraPredMode resulting fromexclusion, from all the intra prediction modes, of the intra predictionmodes included in the MPM candidate list X. The intra prediction modewhich is selectable as RemIntraPredMode is referred to as “non-MPM” or“REM”. RemIntraPredMode is derived using the intra_luma_mpm_remainder.

Configuration of Video Decoding Apparatus

Next, a configuration of the video decoding apparatus 31 (FIG. 7)according to the present embodiment will be described.

The video decoding apparatus 31 includes an entropy decoder 301, aparameter decoder (a prediction image decoding apparatus) 302, a loopfilter 305, a reference picture memory 306, a prediction parametermemory 307, a prediction image generation unit (prediction imagegeneration apparatus) 308, an inverse quantization and inverse transformprocessing unit 311, and an addition unit 312. Note that the loop filter305 may be omitted from the video decoding apparatus 31 in conformitywith the video coding apparatus 11 described below.

The parameter decoder 302 includes an inter prediction parameter decoder303 and an intra prediction parameter decoder 304 not illustrated. Theprediction image generation unit 308 includes an inter prediction imagegeneration unit 309 and an intra prediction image generation unit 310.

An example in which CTUs and CUs are used as units of processing will bedescribed below, but the present disclosure is not limited to thisexample, and processing may be performed in units of sub-CUs.Alternatively, the CTUs and CUs may be replaced with blocks, the sub-CUsmay be replaced with sub-blocks, and the processing may be performed inunits of blocks or sub-blocks.

The entropy decoder 301 performs entropy decoding on the coding streamTe input from the outside and separates and decodes individual codes(syntax components). Entropy coding is classified into a scheme in whichsyntax components are variable-length-coded by using a context(probability model) adaptively selected depending on the type of thesyntax components or the surrounding situation, and a scheme in which asyntax component is variable-length-coded by using a predetermined tableor calculation formula. The former Context Adaptive Binary ArithmeticCoding (CABAC) stores, in a memory, the updated probability model foreach coded or decoded picture (slice). As an initial state of thecontext of the P picture or the B picture, a probability model of thepicture using a quantization parameter with the same slice type and thesame slice level is set from among the probability models stored in thememory. This initial state is used for coding and decoding processing.Separated codes include prediction information used to generate aprediction image and a prediction error used to generate a differenceimage.

The entropy decoder 301 outputs the separated codes to the parameterdecoder 302. Which code is to be decoded is controlled based on anindication of the parameter decoder 302.

Configuration of Intra Prediction Parameter Decoder 304

Based on the code input from the entropy decoder 301, the intraprediction parameter decoder 304 references the prediction parameterstored in the prediction parameter memory 307 to decode the intraprediction parameter, for example, the intra prediction modeIntraPredMode. The intra prediction parameter decoder 304 outputs adecoded intra prediction parameter to the prediction image generationunit 308, and also stores the decoded intra prediction parameter in theprediction parameter memory 307. The intra prediction parameter decoder304 may derive different intra prediction modes depending on luminanceand chrominance.

FIG. 8 is a schematic diagram illustrating a configuration of the intraprediction parameter decoder 304 of the parameter decoder 302. Asillustrated in FIG. 8, the intra prediction parameter decoder 304includes a parameter decoding control unit 3041, a luminance intraprediction parameter decoder 3042, and a chrominance intra predictionparameter decoder 3043.

The parameter decoding control unit 3041 instructs the entropy decoder301 to decode the syntax component, and receives the syntax componentfrom the entropy decoder 301. In a case that intra_luma_mpm_flag is 1,the parameter decoding control unit 3041 outputs intra_luma_mpm_idx toan MPM parameter decoder 30422 in the luminance intra predictionparameter decoder 3042. In a case that intra_luma_mpm_flag is 0, theparameter decoding control unit 3041 outputs intra_luma_mpm_remainder toa non-MPM parameter decoder 30423 of the luminance intra predictionparameter decoder 3042. The parameter decoding control unit 3041 outputsa syntax component of a chrominance intra prediction parameter to thechrominance intra prediction parameter decoder 3043.

The luminance intra prediction parameter decoder 3042 is configured toinclude the MPM candidate list derivation unit 30421, the MPM parameterdecoder 30422, and the non-MPM parameter decoder 30423 (a decoder, aderivation unit).

The MPM parameter decoder 30422 references mpmCandList[ ] derived by theMPM candidate list derivation unit 30421 and intra_luma_mpm_idx toderive IntraPredModeY, and outputs IntraPredModeY to the intraprediction image generation unit 310.

The non-MPM parameter decoder 30423 derives RemIntraPredMode frommpmCandList[ ] and intra_luma_mpm_remainder and outputs IntraPredModeYto the intra prediction image generation unit 310.

The chrominance intra prediction parameter decoder 3043 derivesIntraPredModeC from the syntax component of the chrominance intraprediction parameter, and outputs the derived IntraPredModeC to theintra prediction image generation unit 310.

The loop filter 305 is a filter provided in a coding loop to removeblock distortion and ringing distortion and improve image quality. Theloop filter 305 applies a filter such as a deblocking filter, a SampleAdaptive Offset (SAO), and an Adaptive Loop Filter (ALF) on a decodedimage of a CU generated by the addition unit 312.

The reference picture memory 306 stores a decoded image of the CUgenerated by the addition unit 312 in a predetermined position for eachtarget picture and target CU.

The prediction parameter memory 307 stores the prediction parameter in aposition predetermined for each CTU or CU to be decoded. Specifically,the prediction parameter memory 307 stores a parameter decoded by theparameter decoder 302 and a prediction mode predMode separated by theentropy decoder 301.

The prediction image generation unit 308 receives input of theprediction mode predMode, the prediction parameter, and the like. Theprediction image generation unit 308 reads a reference picture from thereference picture memory 306. In the prediction mode indicated by theprediction mode predMode, the prediction image generation unit 308generates a prediction image of a block or a sub-block by using theprediction parameter and the read reference picture (reference pictureblock). Here, the reference picture block refers to a set of pixels(referred to as a block because the set is normally rectangular) on arefers to picture and is a region that is referenced to generate aprediction image.

Intra Prediction Image Generation Unit 310

In a case that the prediction mode predMode indicates an intraprediction mode, the intra prediction image generation unit 310 performsintra prediction by using the intra prediction parameter input from theintra prediction parameter decoder 304 and a reference pixel read fromthe reference picture memory 306.

Specifically, the intra prediction image generation unit 310 reads, fromthe reference picture memory 306, an adjacent block located on thetarget picture and within a preset range from the target block. Thepredetermined range includes adjacent blocks located to the left, at theupper left, above, and at the upper right of the target block, and thereferenced area varies depending on the intra prediction mode.

The intra prediction image generation unit 310 references a read decodedpixel value and the prediction mode indicated by IntraPredMode togenerate a prediction image of the target block. The intra predictionimage generation unit 310 outputs the generated prediction image of theblock to the addition unit 312.

The generation of the prediction image based on the intra predictionmode will be described below. In the Planar prediction, the DCprediction, and the Angular prediction, a decoded peripheral regionadjacent to (proximate to) the prediction target block is set as areference region R. Then, the pixels on the reference region R areextrapolated in a particular direction to generate a prediction image.For example, the reference region R may be set as an L-shaped region(e.g., a region indicated by the shaded circle pixels in Example 1 ofthe reference area in FIG. 9) including portions to the left of andabove (or further at the upper left of, at the upper right of, and atthe lower left of) the prediction target block.

Details of Prediction Image Generation Unit

Now, a configuration of the intra prediction image generation unit 310will be described in detail using FIG. 10. The intra prediction imagegeneration unit 310 includes a reference sample filter unit 3103 (secondreference image configuration unit), a predictor 3104, and a predictionimage corrector 3105 (prediction image corrector, filter switching unit,weighting factor changing unit).

Based on the reference pixels (reference images) on the reference regionR, a filtered reference image resulting from application of a referencepixel filter (first filter), and the intra prediction mode, thepredictor 3104 generates a temporary prediction image (uncorrectedprediction image) of the prediction target block, and outputs thegenerated image to the prediction image corrector 3105. The predictionimage corrector 3105 corrects the temporary prediction image inaccordance with the intra prediction mode, and generates and outputs aprediction image (corrected prediction image).

Hereinafter, the units included in the intra prediction image generationunit 310 will be described.

Reference Sample Filter Unit 3103

The reference sample filter unit 3103 references the reference image toderive a reference sample s [x] [y] at each position (x, y) on thereference region R. The reference sample filter unit 3103 applies areference pixel filter (first filter) to the reference sample s [x] [y]in accordance with the intra prediction mode to update the referencesample s [x] [y] at each position (x, y) on the reference region R(derive the filtered reference image s [x] [y]). Specifically, alow-pass filter is applied to the reference image at a position (x, y)and surrounding reference images to derive a filtered reference image(Example 2 of the reference region in FIG. 9). Note that the low passfilter need not necessarily be applied to all the intra prediction modesbut may be applied to some of the intra prediction modes. Note that thefilter applied to the reference images on the reference region R in thereference sample filter unit 3103 is referred to as a “reference pixelfilter (first filter)” and that a filter provided in the predictionimage corrector 3105, described below, to correct the temporaryprediction image is referred to as a “position-dependent filter (secondfilter)”.

Configuration of Intra Predictor 3104

Based on the intra prediction mode, the reference image, and thefiltered reference pixel value, the intra predictor 3104 generates atemporary prediction image of the prediction target block (a temporaryprediction pixel value and an uncorrected prediction image) based on thereference image and outputs the generated image to the prediction imagecorrector 3105. The predictor 3104 internally includes a Planarpredictor 31041, a DC predictor 31042, an Angular predictor 31043, an LMpredictor 31044, and an MIP unit 31045. The predictor 3104 selects aspecific predictor in accordance with the intra prediction mode, andinputs the reference image and the filtered reference image. Therelationship between the intra prediction mode and the correspondingpredictor is as follows.

-   -   Planar prediction Planar predictor 31041    -   DC prediction DC predictor 31042    -   Angular prediction Angular predictor 31043    -   LM prediction LM predictor 31044    -   Matrix intra prediction MIP unit 31045

Planar Prediction

The Planar predictor 31041 linearly adds reference samples s [x] [y] inaccordance with the distance between a prediction target pixel positionand a reference pixel position to generate a temporary prediction image,and outputs the temporary prediction image to the prediction imagecorrector 3105.

DC Prediction

The DC predictor 31042 derives a DC prediction value corresponding tothe average value of the reference sampled s [x] [y], and outputs atemporary prediction image q [x] [y] having a pixel value correspondingto the DC prediction value.

Angular Prediction

The Angular predictor 31043 generates a temporary prediction image q [x][y] by using the reference samples s [x] [y] in the prediction direction(reference direction) indicated by the intra prediction mode, andoutputs the generated image to the prediction image corrector 3105.

LM Prediction

The LM predictor 31044 predicts a chrominance pixel value based on theluminance pixel value. Specifically, the scheme uses a linear model togenerate a prediction image of a chrominance image (Cb, Cr) based on thedecoded luminance image. An example of LM prediction is aCross-Component Linear Model prediction (CCLM). The CCLM prediction is aprediction scheme in which a linear model for predicting chrominancefrom luminance is used for one block.

MIP Example 1

An example of Matrix-based intra prediction (MIP) processing performedby the MIP unit 31045 will be described with reference to FIGS. 11 to22. MIP is a technique for deriving a prediction image by a product-sumoperation performed on a reference image derived from an adjacent imageand a weight matrix. In the drawings, the target block has a width nTbWand a height nTbH.

(1) Derive Boundary Reference Pixel

The MIP unit derives the variable sizeId related to the size of thetarget block by using the following equation (FIG. 18).

sizeId=(nTbW<=4&& nTbH<=4)?0:(nTbW<=8&& nTbH<=8)?1:2  (MIP-1)

As illustrated in FIG. 18, in a case that the size of the target block(nTbW x nTbH) is 4×4, 8×8, and 16×16, sizeId is 0, 1, and 2,respectively. SizeId=2 for 4×16 and 16×4.

Next, the MIP unit 31045 uses sizeId to derive the number of MIP modesnumModes, a down-sampled reference region redT [ ], the size of redL [ ]boundarySize, the width predW and height predH of an intermediateprediction image predMip [ ][ ], the size predC of one side of aprediction image obtained during prediction processing with a weightmatrix mWeight[predC*predC] [inSize].

numModes = (sizeId == 0) ? 35 :(sizeId == 1) ? 19 :11 (MIP − 2)boundarySize = (sizeId == 0) ? 2 :4 predW = (sizeId <= 1) ? 4 :Min(nTbW,8) predH = (sizeId <= 1) ? 4 :Min(nTbH, 8) predC = (sizeId <= 1) ? 4 :8

The relationship between sizeId and the values of these variables isindicated in FIG. 17.

The weight matrix is square (predC*predC) and is 4×4 for sizeId=0 andsizeId=1 and is 8×8 for sizeId=2. In a case that the size of the weightmatrix is different from the output size predW*predH of the intermediateprediction image (in particular, predC>predW or predC>predH), referenceis made with the weight matrix decimated as described below. Forexample, in the present embodiment, in a case that the output size is4×16 and 16×4, a weight matrix with a size (predC) of 8 indicated bysizeId=2 is selected, leading to the case of predW=4 (<predC=8) and thecase of predH=4 (<predC=8), respectively. Since the size of theintermediate prediction image (predW*predH) needs to be equal to orsmaller than the size of the target block nTbW*nTbH, and thus in a casethat the target block has a small size, selection of a larger weightmatrix (predC*predC) leads to a need for processing for making the sizeof the weight matrix compatible with the size of the intermediateprediction image.

The MIP unit 31045 uses IntraPredMode to derive a transpose processingflag isTransposed. IntraPredMode corresponds to, for example, intraprediction modes 0 to 66, illustrated in FIG. 6, for example.

isTransposed=(IntraPredMode>(numModes/2))?1:0

The following are derived: the number of reference pixels inSize usedfor a prediction based on a weight matrix mWeight [predC*predC] [inSize]and the width and height mipW and mipH of the transposed intermediateprediction image predMip [ ][ ].

inSize = 2 * boundarySize − ((sizeId == 2)?1 :0) mipW = isTransposed ?predH : predW mipH = isTransposed ? predW : predH

The matrix reference pixel derivation unit of the MIP unit 31045 sets,in a first reference region refT [x] (x=0 . . . nTbW−1), a pixel valuepredSamples [x] [−1] (x=0 . . . nTbW−1) of a block adjacently above thetarget block. A pixel value predSamples [−1] [y] (y=0 . . . nTbH−1) of ablock adjacently leftward of the target block is set in a firstreference area refL [y] (y=0 . . . nTbH−1). Next, the MIP unit 31045down-samples a first reference region refT [x], refL [y] to derive asecond reference region redT [x] (x=0 . . . boundarySize−1), redL [y](y=0 . . . boundarySize−1). For the down-sampling, similar processing isperformed on refT [ ], refL [ ], and thus the expression refS [i] (i=0 .. . nTbX−1), redS [i] (i=0 . . . boundarySize−1) is hereinafter used.

The matrix reference pixel derivation unit performs the followingprocessing on refS[ ] into which refT [ ] or refL [ ] is substituted toderive redS[ ]. In a case that refT is substituted into refS, thennTbS=nTbW. In a case that refL is substituted into refS, then nTbS=nTbH.

if (boundarySize < nTbS) { bDwn = nTbS/boundarySize (MIP − 3) for (x =0; x < boundarySize; x++)  redS[x]= ΣrefS [x * bDwn + i] + (1 << (Log2(bDwn) − 1))) >> Log2(bDwn) } else  for (x = 0; x boundarySize; x++) redS [x]=refS [x] Here, Σ is the sum of i = 0 to i = bDwn − 1.

Then, the matrix reference pixel derivation unit couples the secondreference region redL [ ] and redT [ ] to derive p [i] (i=0 . . . 2boundarySize−1).

if (isTransposed == 1) (MIP − 4) for (i = 0; i < boundarySize; i++) { pTemp [i] = redL [i]  pTemp [i + boundarySize] = redT [i] } else  for(i =0; i < boundarySize; i++) {  pTemp [i] = redT [i]  pTemp [i +boundarySize] = redL [i] } if (sizeId == 2)  for (i = 0; i < inSize;i++)  p [i] = pTemp [i + 1] − pTemp [0] else {  p [0] = pTemp [0] − (1<< (BitDepthY − 1))  for (i = 1; i < inSize; i++)  p [i] = pTemp [i] −pTemp [0] } bitDepthY is the bit depth of luminance and may be, forexample, 10 bits.

Note that in a case that the reference pixel described above fails to bereferenced, an available value of the reference pixel is used as is thecase with the known intra prediction. In a case that none of thereference pixels can be referenced, 1<<(bitDepthY−1) is used as a pixelvalue. isTransposed represents whether the prediction direction is closeto the vertical prediction or not, the patterns of mWeight [ ][ ] can bereduced by half by using isTransposed to switch between storage of redLor redT in the former half of p [ ].

(2) Derive Prediction Pixel (Matrix Operation)

The MIP unit 31045 derives an intermediate prediction image predMip [ ][] with a size of predW*predH by matrix operation on p [ ] in STEP2DERIVE PREDICTION PIXEL (MATRIX OPERATION) in FIG. 11.

The weight matrix derivation unit of the MIP unit 31045 referencessizeId and modeId to select a weight matrix mWeight[predC*predC][inSize] from a set of matrices.

First, the weight matrix derivation unit derives modeId usingIntraPredMode. modeId is an intra prediction mode used in MIP.

modeId = IntraPredMode − ((isTransposed == 1) ? (numModes/2) : 0)

For sizeId=0, the weight matrix derivation unit references modeId toselect mWeight [16] [4] from the array WeightS0 [18] [16] [4], whichstores the weight matrix. For sizeId=1, the weight matrix derivationunit references modeId to select mWeight [16] [8] from the arrayWeightS1 [10] [16] [8], which stores the weight matrix. For sizeId=2,the weight matrix derivation unit references modeId to select mWeight[64] [7] from the array WeightS2 [6] [64] [7], which stores the weightmatrix. These are represented by the formula below.

if (sizeId == 0) (MIP − 5) mWeight [i] [j] = WeightS0 [modeId] [i] [j](i = 0 .. 15, j = 0 .. 3) else if (sizeId == 1)  mWeight [i] [j] =WeightS1 [modeId] [i] [j] (i = 0 .. 15, j = 0 .. 7) else // sizeId = 2 mWeight [i] [j] = WeightS2 [modeId] [i] [j] (i = 0 .. 63, j = 0 .. 6)

Then, the weight matrix derivation unit references sizeId and modeId toderive a shift value sW and an offset coefficient fO used in (MIP-7).ShiftS0 [18], ShiftS1 [10], ShiftS2 [6] are array that store shiftvalues, and OffsetS0 [18], OffsetS1 [10], OffsetS2 [6] are array thatstore offset coefficients.

if (sizeId == 0) { (MIP − 6)  sW = ShiftS0 [modeId]  fO = OffsetS0[modeId] } else if (sizeId == 1) {  sW = ShiftS1 [modeId]  fO = OffsetS1[modeId] } else { // sizeId = 2  sW = ShiftS2 [modeId]  fO = OffsetS2[modeId] }

The matrix prediction image derivation unit of the MIP unit 31045performs a product-sum operation of (MIP-7) on p [ ] to derive predMip [][ ] of the size of the mipW*mipH. Here, an element of the weight matrixmWeight [ ][ ] is referenced for each corresponding position of predMip[ ] to derive the intermediate prediction image. Note that in thepresent example, for sizeId=2, the size predC of the weight matrix maybe larger than the size mipW or mipH of predMip. For this reason, theweight matrix is subjected to decimation by using variables incW andincH before referencing.

oW = (1 << (sW − 1)) − fO * Σp [i] incW = (predC > mipW) ? 2 :1 incH =(predC > mipH) ? 2 :1 for (x = 0; x < mipW; x++) (MIP − 7)  for (y = 0;y < mipH; y++) { predMip [x] [y] = (((ΣmWeight [i] [y * incH * predC +x*incW] * p [i]) + oW) >> sW) + pTemp [0] predMip [x] [y] = Clip1Y(predMip [x] [y]) } Σ is the sum of i = 0 to i = inSize − 1.

In a case that isTransposed=1, the input p [ ] to the product-sumoperation is stored with the position of the upper reference pixelreplaced with the position of the left reference pixel, and the outputof the product-sum operation predMip [ ][ ] is transposed before beingoutput to (3).

if (isTransposed == 1) { (MIP − 8) for (x = 0; x < predW; x++)  for (y =0; y < predH; y++) tmpPred [x] [y] = predMip [y] [x] for (x = 0; x <predW; x++)  for (y = 0; y < predH; y++) predMip [x] [y] = tmpPred [x][y] }

(3) Derive Prediction Pixel (Linear Interpolation)

In a case that nTbW=predW and nTbH=predH, the matrix prediction imageinterpolation unit of the MIP unit 31045 copies predMip [ ][ ] topredsamples H.

for (x = 0; x < nTbW; x++) for (y = 0; y < nTbH; y++) predSamples [x][y] = predMip [x] [y]

Otherwise (nTbW>predW or nTbH>predH), the matrix prediction imageinterpolation unit stores predMip [ ] in a prediction image predSamples[ ][ ] with a size nTbW*nTbH in 3-1 of STEPS DERIVE PREDICTION PIXEL(LINEAR INTERPOLATION) in FIG. 11. In a case that predW and predH aredifferent from nTbW and nTbH, the prediction pixel values areinterpolated in 3-2.

(3-1) The matrix prediction image interpolation unit stores predMip [ ][] in predSamples [ ][ ]. In other words, in a pre-interpolation image inFIG. 12, predMip [ ][ ] is stored in hatched pixel positions in theupper right and lower left direction.

upHor = nTbW/predW (MIP − 9) upVer = nTbH/predH for (x = 0; x < predW;x++)  for (y = 0; y < predH; y++) predSamples [(x + 1) * upHor − 1] [(y + 1) * upVer−1] = predMip [x] [y]

(3-2) For nTbH>nTbW, pixels that have not been stored in (3-1) areinterpolated first in the horizontal direction and then in the verticaldirection by using pixel values for adjacent blocks to generate aprediction image.

Horizontal interpolation is performed to derive pixel values atpositions indicated by circles by using predSamples [xHor] [yHor] andpredSamples [xHor+upHor] [yHor] (hatched pixels in the horizontallyinterpolated image in the figure).

for (m = 0; m < predW; m++) (MIP − 10) for (n = 1; n <= predH; n++) for(dX = 1; dX < upHor; dX++) {  xHor = m * upHor − 1  yHor = n * upVer − 1 sum = (upHor − dX) * predSamples [xHor] [yHor] + dX * predSamples[xHor + upHor] [yHor]  predSamples [xHor + dX] [yHor] = (sum +upHor/2)/upHor }

After the horizontal interpolation, pixel values at positions indicatedby circles are derived by using predSamples [xVer] [yVer] andpredSamples [xVer] [yVer+upVer] (hatched pixels in the verticallyinterpolated image in the figure).

for (m = 0; m < nTbW; m++) (MIP − 11)  for (n = 0; n < predH; n++)  for(dY = 1; dY < upVer; dY++) { xVer = m yVer = n * upVer − 1 sum = (upVer− dY) * predSamples [xVer] [yVer] + dY * predSamples [xVer] [yVer +upVer] predSamples [xVer] [yVer + dY] = (sum + upVer/2)/upVer }

For nTbH<=nTbW, interpolation is performed first in the verticaldirection and then in the horizontal direction by using the pixel valuesfor the adjacent blocks to generate a prediction image. The vertical andhorizontal interpolation processing is similar to that in the case ofnTbH>nTbW.

MIP Example 2

In the present example, an example will be described that simplifies,compared to MIP Example 1, processing without a decrease in codingefficiency. The description below focuses on changes, and thus portionsthat are not described below correspond to the same processing as thatin MIP Example 1.

FIG. 16 illustrates a configuration of the MIP unit 31045 thatreferences a square matrix mWeight to derive a square intermediateprediction image predMip with the same size. A width and a height ofmWeight is smaller than or equal to the width nTbW and the height bTbHof the target block, respectively.

In the present example, for sizeId=2, predW=predH=predC is set.Accordingly, the definition of sizeId is changed. Hereinafter, predW,predH, and predC are described as predSize.

(1) Derive Boundary Reference Pixel

The MIP unit derives the variable sizeId related to the size of thetarget block by using the following equation (FIG. 20).

sizeId=(nTbW<=4&& nTbH<=4&& nTbH<=4)?0:(nTbW<=4∥nTbH<=4∥nTbW<==8&&nTbH==8))?1:2   (MIP-21)

For example, if the size of the target block is 4×N, N×4 (N>4), and 8×8,sizeId is 1. With the same classification, the expression (MIP-21) mayuse a different form. For example, the following expression can be used.

sizeId=(nTbW<=4&& nTbH<=4)?0:((nTbW<=8&&nTbH<=8)∥nTbW<=4∥nTbH<=4)?1:2  (MIP-21)

Another example may be the following.

sizeId=(nTbW<=4&& nTbH<=4)?0:((nTbW==8&&nTbH==8)∥nTbW<=4∥nTbH<==4)?1:2  (MIP-21)

In a case that the minimum size of the input block is 4×4, nTbW <=4 andnTbH <=4 may be replaced with nTbW==4 and nTbH==4, respectively.

Furthermore, in a case that the block size to which the MIP is appliedis limited, the MIP unit may derive sizeId by another derivation method.For example, as illustrated in FIG. 20, in a case that the MIP isapplied only to blocks with an input block size aspect ratio of 4 orless (Abs (Log 2 (nTbW)−Log 2 (nTbH))<=2), sizeId may be derived asfollows instead of (MIP-21).

sizeId=(nTbW<=4&& nTbH<=4)?0:(nTbW*nTbH<=64)?1:2  (MIP-21a)

Alternatively, a logarithmic representation may be used to performderivation as follows.

sizeId=(nTbW<=4&& nTbH<=4)?0:(Log 2(nTbW)+Log 2(nTbH)<=6)?1:2  (MIP-21b)

In a case that the block size to which the MIP is applied is limited, aneffect that simplifies processing is produced because sizeId is derivedusing (MIP-21a) and (MIP-21b).

As illustrated in FIG. 20, in the present embodiment, in the case of4×16 and 16×4, a matrix indicated by sizeId=1 and having a size (predC)of 4 is selected, preventing predW and predH from becoming smaller thanthe size of the matrix predC(=predSize). The MIP unit 31045 of thepresent embodiment selects a matrix having a size equal to or smallerthan nTbW and bTbH (predC=predSize), that is, a matrix satisfying thefollowing equation.

predSize=predC<=min(nTbW,nTbH)

In the present embodiment, the size of the matrix is 4×4 in the case ofsizeId=0, and is 8×8 in the case of sizeId=2. Thus, the MIP unit 31045selects “a matrix with sizeId=0 or sizeId=1 in a case that one of nTbWand bTbH is 4”. Such limitation to the selection is the same in FIG. 21and FIG. 22 described below.

In other words, the weight matrix derivation unit included in the MIPunit 31045 derives a matrix with a size including a width and a heightequal to or smaller than the width and height of the target block size.The weight matrix derivation unit derives a matrix with a size of 4×4 ina case that one side of the target block is 4. The weight matrixderivation unit derives a matrix with a size of 4×4 in a case that thetarget block size is 4×16 and in a case that the target block size is16×4. The weight matrix derivation unit derives one of a matrixindicated by sizeId=0, 1 and having a size of 4×4 and a matrix indicatedby sizeId=2 and having a size of 8×8, and derives a matrix with sizeId=1or 2 in a case that one side of the target block is 4.

Then, the MIP unit 31045 uses sizeId to derive the number of MIP modesnumModes, the down-sampled reference region redT [ ], the size of redL [] boundarySize, the weight matrix mWeight, and the width and heightpredSize of the intermediate prediction image predMip [ ][ ].

numModes = (sizeId == 0) ? 35 :(sizeId == 1) ? 19 :11 (MIP − 22)boundarysize = (sizeId == 0) ? 2 :4 predSize = (sizeId <= 1) ? 4 :8FIG. 19 illustrates the relationship between sizeId and the values ofthese variables.

The derivation of isTransposed and inSize is similar to the derivationof isTransposed and inSize in MIP Example 1.

Derivation of p [ ] and pTemp [ ] is also similar to the derivation of p[ ] and pTemp [ ] in MIP Example 1; the derivation of p [ ] and pTemp [] is required for the derivation of the first reference region refT [ ],refL [ ], the second reference area redT [ ], redL [ ], and predMip.

(2) Derive Prediction Pixel (Matrix Operation)

The MIP unit 31045 derives predMip [ ][ ] with the size predSizepredSize by a matrix operation performed on p [ ] in the STEP2 DERIVEPREDICTION PIXEL (MATRIX OPERATION) in FIG. 11.

The weight matrix derivation unit of the MIP unit 31045 referencessizeId and modeId to select a weight matrix mWeight [predSize predSize][inSize] from a set of matrices.

The selection method for modeId and mWeight [ ][ ] and the derivationmethod for the shift value sW and the offset coefficient fO are the sameas those in MIP Example 1.

The matrix prediction image derivation unit of the MIP unit 31045derives predMip [ ][ ] with the size predSize*predSize by a product-sumoperation of (MIP-23) on p [ ]. Here, in the classification of sizeId inthe present example, mipW and mipH are always equal to or larger thanpredSize (predC). Accordingly, incW and incH in Example 1 are always 1,and the calculations are omitted.

oW= (1 << (sW − 1)) − fO * Σp [i] for (x = 0; x < predSize; x++) (MIP −23)  for (y = 0; y < predSize; y++) { predMip [x] [y] = (((ΣmWeight [i][y * predSize + x] * p [i]) + oW) >> sW) + pTemp [0] predMip [x] [y] =Clip1Y (predMip [x] [y]) } Σ is the sum of i = 0 to i = inSize − 1. if(isTransposed = = 1) { (MIP − 24)  for (x = 0; x < predSize; x++) for (y= 0; y < predSize; y++)  tmpPred [x] [y] = predMip [y] [x]  for (x = 0;x < predSize; x++) for (y = 0; y < predSize; y++)  predMip [x] [y] =tmpPred [x] [y] }

(3) Derive Prediction Pixel (Linear Interpolation)

In a case that nTbW=predSize and nTbH=predSize, the matrix predictionimage interpolation unit of the MIP unit 31045 copies predMip [ ][ ] topredsamples [ ][ ].

for (x = 0; x < nTbW; x++) for (y = 0; y < nTbH; y++) predSamples [x][y] = predMip [x] [y]

Otherwise (nTbW>predSize or nTbH>predSize), the matrix prediction imageinterpolation unit enlarges predMip [ ] with predSize predSize to thepredicted image predSamples [ ] with a size of nTbW*nTbH in STEPS DERIVEPREDICTION PIXEL (LINEAR INTERPOLATION) in FIG. 11. In 3-1, the pixelsat the corresponding positions are copied, whereas in 3-2, the pixels atnon-corresponding positions are derived by interpolation.

(3-1) The matrix prediction image interpolation unit stores predMip [ ][] in corresponding positions in predSamples [ ]. In other words, in thepre-interpolation image in FIG. 12, predMip [ ][ ] is stored in hatchedpixel positions in predSamples [ ] in 3-1.

upHor = nTbW/predSize (MIP − 25) upVer = nTbH/predSize for (x = 0; x <predSize; x++)  for (y = 0; y < predSize; y++)  predSamples [(x + 1) *upHor − 1] [(y + 1) * upVer − 1] = predMip [x] [y]

(3-2) For nTbH>nTbW, pixels that have not been stored in (3-1) areinterpolated in the horizontal direction and in the vertical directionby using pixel values for adjacent blocks to generate a predictionimage. In the following, interpolation is performed first in thehorizontal direction and then in the vertical direction, but may beinterpolated first in the vertical direction and then in the horizontaldirection.

Horizontal interpolation is performed to derive pixel values atpositions indicated by circles by using predSamples [xHor] [yHor] andpredSamples [xHor+upHor] [yHor] (hatched pixels in the horizontallyinterpolated image in the figure).

for (m = 0; m < predSize; m++) (MIP − 26)  for (n = 1; n <= predSize;n++)  for (dX = 1; dX < upHor; dX++) { xHor = m * upHor − 1 yHor = n *upVer − 1 sum = (upHor − dX) * predSamples [xHor] [yHor] + dX *predSamples [xHor + upHor] [yHor] predSamples [xHor + dX] [yHor] =(sum + upHor/2)/upHor }

After the horizontal interpolation, pixel values at positions indicatedby circles are derived by using predSamples [xVer] [yVer] andpredSamples [xVer] [yVer+upVer] (hatched pixels in the verticallyinterpolated image in the figure).

for (m = 0; m < nTbW; m++) (MIP − 27)  for (n = 0; n < predSize; n++) for (dY = 1; dY < upVer; dY++) { xVer = m yVer = n * upVer − 1 sum =(upVer − dY) * predSamples [xVer] [yVer] + dY * predSamples [xVer][yVer + upVer] predSamples [xVer] [yVer + dY] = (sum + upVer/2)/upVer}

For nTbH<=nTbW, interpolation is performed first in the verticaldirection and then in the horizontal direction by using the pixel valuesfor the adjacent blocks to generate a prediction image. The vertical andhorizontal interpolation processing is similar to that in the case ofnTbH>nTbW.

The MIP unit 31045 in MIP Example 2 derives a square(predW=predH=predSize) intermediate prediction image predMip [ ][ ].Address calculation for the prediction image is facilitated, simplifyingthe derivation processing.

The MIP unit 31045 in MIP Example 2 selects predSize equal to or smallerthan the width nTbW and height nTbH of the target block, and thus thematrix size predC(=predSize) selected by sizeId is equal to predW andpredH, facilitating referencing of the matrix elements in the derivationof predMip.

By limiting the width and height of the prediction image classified intosizeId=2, MIP Example 2 can significantly reduce the number ofcalculations compared to MIP Example 1. Simulations have confirmed thatthere is substantially no decrease in coding efficiency due to thesechanges.

MIP Example 3

In the present example, another example will be described thatsimplifies, compared to MIP Example 1, processing without a decrease incoding efficiency. The description below focuses on changes, and thusportions that are not described below correspond to the same processingas that in MIP Example 2.

In the present example, for sizeId=2, predW=predH=predC is set.Accordingly, the definition of sizeId is changed. Hereinafter, predW,predH, and predC are described as predSize.

(1) Derive Boundary Reference Pixel

The MIP unit derives the variable sizeId related to the size of thetarget block by using the following equation (upper portion of FIG. 21).

sizeId=(nTbW<=4&& nTbH<=4)?0:(nTbW<=4∥nTbH<=4)?1:2  (MIP-28)

Alternatively, sizeId may be determined under another condition (lowerportion of FIG. 21).

sizeId=(nTbW<=4&& nTbH<=4)?0:(nTbW<=8∥nTbH<=8)?1:2  (MIP-29)

(2) Derive Prediction Pixel (Matrix Operation)

The derivation is similar to the corresponding derivation in MIP Example2.

(3) Derive Prediction Pixel (Linear Interpolation)

The derivation is similar to the corresponding derivation in MIP Example2.

As described above, MIP Example 3 further simplifies the determinationof sizeId to enable a further reduction in the number of calculations,compared to MIP Example 2.

Note that, like MIP Example 2, the MIP Example 3 derives a square(predW=predH=predSize) intermediate prediction image predMip [ ][ ] andselects predSize equal to or smaller than the width nTbW and height nTbHof the target block to limit the width and height of the predictionimage classified into sizeId=2. Thus, MIP Example 3 produces the sameeffects as those in MIP Example 2.

MIP Example 4

In the present example, another example will be described in which thememory required to store the weight matrix is reduced, compared to MIPExample 1. The description below focuses on changes, and thus portionsthat are not described below correspond to the same processing as thatin MIP Example 2.

In the present example, for sizeId=2, predW=predH=predC is set.Accordingly, the definition of sizeId is changed. Hereinafter, predW,predH, and predC are described as predSize.

(1) Derive Boundary Reference Pixel

The MIP unit derives the variable sizeId related to the size of thetarget block by using the following equation.

sizeId=(nTbW<=4∥nTbH<=4)?0:1  (MIP-30)

The value of sizeId has been described as 0, 1 in the above example.However, in a case that

sizeId=(nTbW<=4∥nTbH<=4)?0:2  (MIP-34)

as in the upper portion of FIG. 22, or

sizeId=(nTbW<=4∥nTbH<=4)?1:2  (MIP-34)

as in the lower portion of FIG. 22, sizeId can be represented as acombination of 0, 2 or 1, 2. Note that, instead of the conditionalexpression (nTbW<=4 ∥ nTbH<=4), (nTbW<=8 II nTbH<=8) may be used.

In the example of the expression MIP-30, sizeId may have two values of0,1. Thus, all of the processing in the case of sizeId=2 in MIP Example2 can be omitted. For example, only the following equation can be usedto derive p [i] (i=0 . . . 2 boundarySize−1) from the second referencearea redL [ ], redT [ ].

if (isTransposed == 1) (MIP − 31)  for (i = 0; i < boundarySize; i++) {pTemp [i] = redL [i] pTemp [i + boundarySize] = redT [i] } else  for (i= 0; i < boundarySize; i++) { pTemp [i] = redT [i] pTemp [i +boundarySize] = redL [i] }

(2) Derive Prediction Pixel (Matrix Operation)

The derivation may be performed as is the case with MIP Example 2.However, the present example does not use sizeId=2, and thus processingfor referencing sizeId and modeId to select the weight matrix mWeight[predSize predSize] [inSize] from the set of matrices may be representedby the following equation, with sizeId=2 omitted.

if (sizeId == 0) (MIP − 32)  mWeight [i] [j] = WeightS0 [modeId] [i] [j](i = 0 .. 15, j = 0 .. 3) else // sizeId == 1  mWeight [i] [j] =WeightS1 [modeId] [i] [j] (i = 0 .. 15, j = 0 .. 7)

Similarly, the processing for referencing sizeId and modeId to derivethe shift value sW and the offset coefficient fO may be represented bythe following equation:

if (sizeId == 0) { (MIP − 33)  sW = ShiftS0 [modeId]  fO = OffsetS0[modeId] } else {// sizeId == 1)  sW = ShiftS1 [modeId]  fO = OffsetS1[modeId] }

(3) Derive Prediction Pixel (Linear Interpolation)

The derivation is similar to the corresponding derivation in MIP Example2.

As described above, MIP Example 3 reduces the types of sizeId comparedto MIP Example 2, thus enabling a reduction in memory required to storethe weight matrix compared to MIP Example 2.

Note that, like MIP Example 2, MIP Example 3 derives a square(predW=predH=predSize) intermediate prediction image predMip [ ][ ] andselects a matrix with a size (predSize) equal to or smaller than thesize of the target block nTbW x nTbH to limit the width and height ofthe prediction image classified into sizeId=2. Thus, MIP Example 3produces the same effects as those in MIP Example 2.

Configuration of Prediction Image Corrector 3105

The prediction image corrector 3105 corrects the temporary predictionimage output from the predictor 3104 in accordance with the intraprediction mode. Specifically, the prediction image corrector 3105derives, for each pixel of the temporary prediction image, a weightcoefficient dependent on the position according to the positions of thereference region R and the target prediction pixel. Then, the referencesamples s [ ][ ] and the temporary prediction image are subjected toweighted addition (weighted average) to correct the temporary predictionimage to a prediction image (corrected prediction image) Pred [ ][ ].Note that in some intra prediction modes, the prediction image corrector3105 does not correct the temporary prediction image and that the outputof the predictor 3104 may be directly used as a prediction image.

The inverse quantization and inverse transform processing unit 311performs inverse quantization on a quantization transform coefficientinput from the entropy decoder 301 to calculate a transform coefficient.These quantization transform coefficients are coefficients obtained byperforming, in coding processing, a frequency transform such as aDiscrete Cosine Transform (DCT) or a Discrete Sine Transform (DST) onthe prediction error to perform quantization. The inverse quantizationand inverse transform processing unit 311 performs an inverse frequencytransform such as an inverse DCT or an inverse DST on the calculatedtransform coefficient to calculate the prediction error. The inversequantization and inverse transform processing unit 311 outputs thecalculated prediction error to the addition unit 312.

The addition unit 312 adds the prediction image P of the block inputfrom the prediction image generation unit 308 to the prediction errorinput from the inverse quantization and inverse transform processingunit 311 for each pixel and generates a decoded image for the block. Theaddition unit 312 stores the decoded image of the block in the referencepicture memory 306 and outputs the image to the loop filter 305.

Configuration of Video Coding Apparatus

Now, a configuration of the video coding apparatus 11 according to thepresent embodiment will be described. FIG. 13 is a block diagramillustrating a configuration of the video coding apparatus 11 accordingto the present embodiment. The video coding apparatus 11 is configuredto include a prediction image generation unit 101, a subtraction unit102, a transform and quantization unit 103, an inverse quantization andinverse transform processing unit 105, an addition unit 106, a loopfilter 107, a prediction parameter memory (a prediction parameterstorage unit, a frame memory) 108, a reference picture memory (areference image storage unit, a frame memory) 109, a coding parameterdetermination unit 110, a prediction parameter coder 111, and an entropycoder 104.

For each picture of an image T, the prediction image generation unit 101generates a prediction image P for each of the CUs into which eachpicture of the image T is split. The operation of the prediction imagegeneration unit 101 is the same as that of the prediction imagegeneration unit 308 already described.

The subtraction unit 102 subtracts the pixel value of the predictionimage of the block input from the prediction image generation unit 101from the pixel value of the image T to generate a prediction error. Thesubtraction unit 102 outputs the generated prediction error to thetransform and quantization unit 103.

The transform and quantization unit 103 performs a frequency transformon the prediction error input from the subtraction unit 102 to calculatea transform coefficient, and derives a quantization transformcoefficient through quantization. The transform and quantization unit103 outputs the obtained quantization transform coefficient to theentropy coder 104 and the inverse quantization and inverse transformprocessing unit 105.

The inverse quantization and inverse transform processing unit 105 isthe same as the inverse quantization and inverse transform processingunit 311 (FIG. 7) in the video decoding apparatus 31, and descriptionsthereof are omitted. The calculated prediction error is output to theaddition unit 106.

To the entropy coder 104, the quantization transform coefficient isinput from the transform and quantization unit 103, and codingparameters are input from the prediction parameter coder 111. Theentropy coder 104 entropy-codes the split information, the predictionparameters, the quantization conversion coefficients, and the like togenerate and output a coding stream Te.

The parameter coder 111 includes a header coder 1110, a CT informationcoder 1111, and a CU coder 1112 (prediction mode coder) not illustrated,an inter prediction parameter coder 112, and an intra predictionparameter coder 113. The CU coder 1112 further includes a TU coder 1114.

Configuration of Intra Prediction Parameter Coder 113

The intra prediction parameter coder 113 derives a format for coding(for example, intra_luma_mpm_idx, intra_luma_mpm_remmainder, and thelike) from the intra prediction mode IntraPredMode input from the codingparameter determination unit 110. The intra prediction parameter coder113 includes a partly identical configuration to a configuration inwhich the intra prediction parameter decoder 304 derives intraprediction parameters.

FIG. 14 is a schematic diagram illustrating a configuration of the intraprediction parameter coder 113 of the parameter coder 111. The intraprediction parameter coder 113 includes a parameter coding control unit1131, a luminance intra prediction parameter derivation unit 1132, and achrominance intra prediction parameter derivation unit 1133.

The parameter coding control unit 1131 receives input of IntraPredModeYand IntraPredModeC from the coding parameter determination unit 110. Theparameter coding control unit 1131 references the mpmCandList [ ] of theMPM candidate list derivation unit 30421 to determine theintra_luma_mpm_flag. Then, the intra_luma_mpm_flag and IntraPredModeYare output to the luminance intra prediction parameter derivation unit1132. The IntraPredModeC is output to the chrominance intra predictionparameter derivation unit 1133.

The luminance intra prediction parameter derivation unit 1132 includesthe MPM candidate list derivation unit 30421 (a candidate listderivation unit), an MPM parameter derivation unit 11322, and a non-MPMparameter derivation unit 11323 (an coder, a derivation unit).

The MPM candidate list derivation unit 30421 references the intraprediction mode of the adjacent blocks stored in the predictionparameter memory 108 to derive mpmCandList [ ]. The MPM parameterderivation unit 11322 derives and outputs intra_luma_mpm_idx from theIntraPredModeY and mpmCandList [ ] to the entropy coder 104 in a casethat the intra_luma_mpm_flag is 1. The non-MPM parameter derivation unit11323 derives RemIntraPredMode from IntraPredModeY and mpmCandList [ ]and outputs intra_luma_mpm_remainder to the entropy coder 104 in a casethat intra_luma_mpm_flag is 0.

The chrominance intra prediction parameter derivation unit 1133 derivesand outputs intra_chroma_pred_mode from IntraPredModeY andIntraPredModeC.

The addition unit 106 adds the pixel value of the prediction image ofthe block input from the prediction image generation unit 101 to thepixel value of the prediction error input from the inverse quantizationand inverse transform processing unit 105 for each pixel and generates adecoded image. The addition unit 106 stores the generated decoded imagein the reference picture memory 109.

The loop filter 107 applies a deblocking filter, SAO, and ALF to thedecoded image generated by the addition unit 106. Note that the loopfilter 107 need not necessarily include the above-described three typesof filters, and may include, for example, only the deblocking filter.

The prediction parameter memory 108 stores the prediction parametersgenerated by the coding parameter determination unit 110 in positionspredetermined for each picture and for each CU.

The reference picture memory 109 stores the decoded image generated bythe loop filter 107 in positions predetermined for each picture and foreach CU.

The coding parameter determination unit 110 selects one set amongmultiple sets of coding parameters. A coding parameter refers to theabove-mentioned QT, BT, or TT split information, the predictionparameter, or a parameter to be coded, the parameter being generated inassociation with the information or prediction parameter. The predictionimage generation unit 101 generates the prediction image using thesecoding parameters.

The coding parameter determination unit 110 calculates, for each of themultiple sets, an RD cost value indicating the magnitude of an amount ofinformation and a coding error. The coding parameter determination unit110 selects a set of coding parameters of which cost value calculated isa minimum value. With this configuration, the entropy coder 104 outputsthe selected set of coding parameters as the coding stream Te. Thecoding parameter determination unit 110 stores the determined codingparameters in the prediction parameter memory 108.

Note that, some of the video coding apparatus 11 and the video decodingapparatus 31 in the above-described embodiments, for example, theentropy decoder 301, the parameter decoder 302, the loop filter 305, theprediction image generation unit 308, the inverse quantization andinverse transform processing unit 311, the addition unit 312, theprediction image generation unit 101, the subtraction unit 102, thetransform and quantization unit 103, the entropy coder 104, the inversequantization and inverse transform processing unit 105, the loop filter107, the coding parameter determination unit 110, and the predictionparameter coder 111, may be realized by a computer. In that case, thisconfiguration may be realized by recording a program for realizing suchcontrol functions on a computer-readable recording medium and causing acomputer system to read the program recorded on the recording medium forexecution. Note that the “computer system” mentioned here refers to acomputer system built into either the video coding apparatus 11 or thevideo decoding apparatus 31 and is assumed to include an OS and hardwarecomponents such as a peripheral apparatus. Furthermore, a“computer-readable recording medium” refers to a portable medium such asa flexible disk, a magneto-optical disk, a ROM, a CD-ROM, and the like,and a storage device such as a hard disk built into the computer system.Moreover, the “computer-readable recording medium” may include a mediumthat dynamically retains a program for a short period of time, such as acommunication line in a case that the program is transmitted over anetwork such as the Internet or over a communication line such as atelephone line, and may also include a medium that retains the programfor a fixed period of time, such as a volatile memory included in thecomputer system functioning as a server or a client in such a case.Furthermore, the above-described program may be one for realizing someof the above-described functions, and also may be one capable ofrealizing the above-described functions in combination with a programalready recorded in a computer system.

A part or all of the video coding apparatus 11 and the video decodingapparatus 31 in the embodiments described above may be realized as anintegrated circuit such as a Large Scale Integration (LSI). Eachfunction block of the video coding apparatus 11 and the video decodingapparatus 31 may be individually realized as processors, or part or allmay be integrated into processors. The circuit integration technique isnot limited to LSI, and the integrated circuits for the functionalblocks may be realized as dedicated circuits or a multi-purposeprocessor. In a case that with advances in semiconductor technology, acircuit integration technology with which an LSI is replaced appears, anintegrated circuit based on the technology may be used.

The embodiment of the present disclosure has been described in detailabove referring to the drawings, but the specific configuration is notlimited to the above embodiments and various amendments can be made to adesign that fall within the scope that does not depart from the gist ofthe present disclosure.

Application Examples

The above-mentioned video coding apparatus 11 and the video decodingapparatus 31 can be utilized being installed to various apparatusesperforming transmission, reception, recording, and regeneration ofvideos. Note that, the video may be a natural video imaged by camera orthe like, or may be an artificial video (including CG and GUI) generatedby computer or the like.

At first, referring to FIG. 2, it will be described that theabove-mentioned video coding apparatus 11 and the video decodingapparatus 31 can be utilized for transmission and reception of videos.

FIG. 2 is a block diagram illustrating a configuration of a transmittingapparatus PROD_A installed with the video coding apparatus 11. Asillustrated in FIG. 2, the transmitting apparatus PROD_A includes ancoder PROD_A1 which obtains coded data by coding videos, a modulationunit PROD_A2 which obtains modulation signals by modulating carrierwaves with the coded data obtained by the coder PROD_A1, and atransmitter PROD_A3 which transmits the modulation signals obtained bythe modulation unit PROD_A2. The above-mentioned video coding apparatus11 is utilized as the coder PROD_A1.

The transmitting apparatus PROD_A may further include a camera PROD_A4that images videos, a recording medium PROD_A5 that records videos, aninput terminal PROD_A6 for inputting videos from the outside, and animage processing unit A7 which generates or processes images, as supplysources of videos to be input into the coder PROD_A1. Although anexample configuration in which the transmitting apparatus PROD_Aincludes all of the constituents is illustrated in FIG. 2, some of theconstituents may be omitted.

Note that the recording medium PROD_A5 may record videos which are notcoded or may record videos coded in a coding scheme for recordingdifferent from a coding scheme for transmission. In the latter case, adecoder (not illustrated) to decode coded data read from the recordingmedium PROD_A5 according to the coding scheme for recording may bepresent between the recording medium PROD_A5 and the coder PROD_A1.

FIG. 2 illustrates a block diagram illustrating a configuration of areceiving apparatus PROD_B installed with the video decoding apparatus31. As illustrated in FIG. 2, the receiving apparatus PROD_B includes areceiver PROD_B1 that receives modulation signals, a demodulation unitPROD_B2 that obtains coded data by demodulating the modulation signalsreceived by the receiver PROD_B1, and a decoder PROD_B3 that obtainsvideos by decoding the coded data obtained by the demodulation unitPROD_B2. The above-mentioned video decoding apparatus 31 is utilized asthe decoder PROD_B3.

The receiving apparatus PROD_B may further include a display PROD_B4that displays videos, a recording medium PROD_B5 for recording thevideos, and an output terminal PROD_B6 for outputting the videos to theoutside, as supply destinations of the videos to be output by thedecoder PROD_B3. Although an example configuration that the receivingapparatus PROD_B includes all of the constituents is illustrated in FIG.2, some of the constituents may be omitted.

Note that the recording medium PROD_B5 may record videos which are notcoded, or may record videos which are coded in a coding scheme forrecording different from a coding scheme for transmission.

In the latter case, an coder (not illustrated) that codes videosacquired from the decoder PROD_B3 according to the coding scheme forrecording may be present between the decoder PROD_B3 and the recordingmedium PROD_B5.

Note that a transmission medium for transmitting the modulation signalsmay be a wireless medium or may be a wired medium. A transmission modein which the modulation signals are transmitted may be a broadcast(here, which indicates a transmission mode in which a transmissiondestination is not specified in advance) or may be a communication(here, which indicates a transmission mode in which a transmissiondestination is specified in advance). That is, the transmission of themodulation signals may be realized by any of a wireless broadcast, awired broadcast, a wireless communication, and a wired communication.

For example, a broadcasting station (e.g., broadcastingequipment)/receiving station (e.g., television receiver) for digitalterrestrial broadcasting is an example of the transmitting apparatusPROD_A/receiving apparatus PROD_B for transmitting and/or receiving themodulation signals in the wireless broadcast. A broadcasting station(e.g., broadcasting equipment)/receiving station (e.g., televisionreceivers) for cable television broadcasting is an example of thetransmitting apparatus PROD_A/receiving apparatus PROD_B fortransmitting and/or receiving the modulation signals in the wiredbroadcast.

A server (e.g., workstation)/client (e.g., television receiver, personalcomputer, smartphone) for Video On Demand (VOD) services, video hostingservices and the like using the Internet is an example of thetransmitting apparatus PROD_A/receiving apparatus PROD_B fortransmitting and/or receiving the modulation signals in communication(usually, any of a wireless medium or a wired medium is used as atransmission medium in LAN, and the wired medium is used as atransmission medium in WAN). Here, personal computers include a desktopPC, a laptop PC, and a tablet PC. In addition, smartphones also includea multifunctional mobile telephone terminal.

A client of a video hosting service has a function of coding a videoimaged with a camera and uploading the video to a server, in addition toa function of decoding coded data downloaded from a server anddisplaying on a display. Thus, the client of the video hosting servicefunctions as both the transmitting apparatus PROD_A and the receivingapparatus PROD_B.

Next, referring to FIG. 3, it will be described that the above-mentionedvideo coding apparatus 11 and the video decoding apparatus 31 can beutilized for recording and regeneration of videos.

FIG. 3 is a block diagram illustrating a configuration of a recordingapparatus PROD_C installed with the above-mentioned video codingapparatus 11. As illustrated in FIG. 3, the recording apparatus PROD_Cincludes an coder PROD_C1 that obtains coded data by coding a video, anda writing unit PROD_C2 that writes the coded data obtained by the coderPROD_C1 in a recording medium PROD_M. The above-mentioned video codingapparatus 11 is utilized as the coder PROD_C1.

Note that the recording medium PROD_M may be (1) a type of recordingmedium built in the recording apparatus PROD_C such as Hard Disk Drive(HDD) or Solid State Drive (SSD), may be (2) a type of recording mediumconnected to the recording apparatus PROD_C such as an SD memory card ora Universal Serial Bus (USB) flash memory, and may be (3) a type ofrecording medium loaded in a drive apparatus (not illustrated) built inthe recording apparatus PROD_C such as Digital Versatile Disc (DVD:trade name) or Blu-ray Disc (BD: trade name).

The recording apparatus PROD_C may further include a camera PROD_C3 thatimages a video, an input terminal PROD_C4 for inputting the video fromthe outside, a receiver PROD_C5 for receiving the video, and an imageprocessing unit PROD_C6 that generates or processes images, as supplysources of the video input into the coder PROD_C1. Although an exampleconfiguration that the recording apparatus PROD_C includes all of theconstituents is illustrated in FIG. 3, some of the constituents may beomitted.

Note that the receiver PROD_C5 may receive a video which is not coded,or may receive coded data coded in a coding scheme for transmissiondifferent from the coding scheme for recording. In the latter case, adecoder for transmission (not illustrated) that decodes coded data codedin the coding scheme for transmission may be present between thereceiver PROD_C5 and the coder PROD_C1.

Examples of such recording apparatus PROD_C include, for example, a DVDrecorder, a BD recorder, a Hard Disk Drive (HDD) recorder, and the like(in this case, the input terminal PROD_C4 or the receiver PROD_C5 is themain supply source of videos). A camcorder (in this case, the cameraPROD_C3 is the main supply source of videos), a personal computer (inthis case, the receiver PROD_C5 or the image processing unit C6 is themain supply source of videos), a smartphone (in this case, the cameraPROD_C3 or the receiver PROD_C5 is the main supply source of videos), orthe like is an example of the recording apparatus PROD_C as well.

FIG. 3 is a block diagram illustrating a configuration of areconstruction apparatus PROD_D installed with the above-mentioned videodecoding apparatus 31. As illustrated in FIG. 3, the reconstructionapparatus PROD_D includes a reading unit PROD_D1 which reads coded datawritten in the recording medium PROD_M, and a decoder PROD_D2 whichobtains a video by decoding the coded data read by the reader PROD_D1.The above-mentioned video decoding apparatus 31 is utilized as thedecoder PROD_D2.

Note that the recording medium PROD_M may be (1) a type of recordingmedium built in the reconstruction apparatus PROD_D such as HDD or SSD,may be (2) a type of recording medium connected to the reconstructionapparatus PROD_D such as an SD memory card or a USB flash memory, andmay be (3) a type of recording medium loaded in a drive apparatus (notillustrated) built in the reconstruction apparatus PROD_D such as a DVDor a BD.

The reconstruction apparatus PROD_D may further include a displayPROD_D3 that displays a video, an output terminal PROD_D4 for outputtingthe video to the outside, and a transmitter PROD_D5 that transmits thevideo, as the supply destinations of the video to be output by thedecoder PROD_D2. Although an example configuration that thereconstruction apparatus PROD_D includes all of the constituents isillustrated in FIG. 3, some of the constituents may be omitted.

Note that the transmitter PROD_D5 may transmit a video which is notcoded or may transmit coded data coded in the coding scheme fortransmission different from a coding scheme for recording. In the lattercase, an coder (not illustrated) that codes a video in the coding schemefor transmission may be present between the decoder PROD_D2 and thetransmitter PROD_D5.

Examples of the reconstruction apparatus PROD_D include, for example, aDVD player, a BD player, an HDD player, and the like (in this case, theoutput terminal PROD_D4 to which a television receiver, and the like areconnected is the main supply destination of videos). A televisionreceiver (in this case, the display PROD_D3 is the main supplydestination of videos), a digital signage (also referred to as anelectronic signboard or an electronic bulletin board, and the like, andthe display PROD_D3 or the transmitter PROD_D5 is the main supplydestination of videos), a desktop PC (in this case, the output terminalPROD_D4 or the transmitter PROD_D5 is the main supply destination ofvideos), a laptop or tablet PC (in this case, the display PROD_D3 or thetransmitter PROD_D5 is the main supply destination of videos), asmartphone (in this case, the display PROD_D3 or the transmitter PROD_D5is the main supply destination of videos), or the like is an example ofthe reconstruction apparatus PROD_D.

Realization by Hardware and Realization by Software

Each block of the above-mentioned video decoding apparatus 31 and thevideo coding apparatus 11 may be realized as a hardware by a logicalcircuit formed on an integrated circuit (IC chip), or may be realized asa software using a Central Processing Unit (CPU).

In the latter case, each of the above-described apparatuses include aCPU that executes a command of a program to implement each of functions,a Read Only Memory (ROM) that stores the program, a Random Access Memory(RAM) to which the program is loaded, and a storage apparatus (recordingmedium), such as a memory, that stores the program and various kinds ofdata. In addition, an objective of the embodiments of the presentdisclosure can be achieved by supplying, to each of the apparatuses, therecording medium that records, in a computer readable form, programcodes of a control program (executable program, intermediate codeprogram, source program) of each of the apparatuses that is software forrealizing the above-described functions and by reading and executing, bythe computer (or a CPU or a MPU), the program codes recorded in therecording medium.

As the recording medium, for example, tapes including a magnetic tape, acassette tape and the like, discs including a magnetic disc such as afloppy (trade name) disk/a hard disk and an optical disc such as aCompact Disc Read-Only Memory (CD-ROM)/Magneto-Optical disc (MOdisc)/Mini Disc (MD)/Digital Versatile Disc(DVD: trade name)/CDRecordable (CD-R)/Blu-ray Disc (trade name), cards such as an IC card(including a memory card)/an optical card, semiconductor memories suchas a mask ROM/Erasable Programmable Read-Only Memory(EPROM)/Electrically Erasable and Programmable Read-Only Memory (EEPROM:trade name)/a flash ROM, logical circuits such as a Programmable logicdevice (PLD) and a Field Programmable Gate Array (FPGA), or the like canbe used.

In addition, each of the apparatuses is configured to be connectable toa communication network, and the program codes may be supplied throughthe communication network. The communication network is required to becapable of transmitting the program codes, but is not limited to aparticular communication network. For example, the Internet, anintranet, an extranet, a Local Area Network (LAN), an IntegratedServices Digital Network (ISDN), a Value-Added Network (VAN), aCommunity Antenna television/Cable Television (CATV) communicationnetwork, a Virtual Private Network, a telephone network, a mobilecommunication network, a satellite communication network, and the likeare available. In addition, a transmission medium constituting thiscommunication network is also required to be a medium which can transmita program code, but is not limited to a particular configuration or typeof transmission medium. For example, a wired transmission medium such asInstitute of Electrical and Electronic Engineers (IEEE) 1394, a USB, apower line carrier, a cable TV line, a telephone line, an AsymmetricDigital Subscriber Line (ADSL) line, and a wireless transmission mediumsuch as infrared ray of Infrared Data Association (IrDA) or a remotecontrol, BlueTooth (trade name), IEEE 802.11 wireless communication,High Data Rate (HDR), Near Field Communication (NFC), Digital LivingNetwork Alliance (DLNA: trade name), a cellular telephone network, asatellite channel, a terrestrial digital broadcast network areavailable. Note that the embodiments of the present disclosure can bealso realized in the form of computer data signals embedded in a carriersuch that the transmission of the program codes is embodied inelectronic transmission.

The embodiments of the present disclosure are not limited to theabove-described embodiments, and various modifications are possiblewithin the scope of the claims. That is, an embodiment obtained bycombining technical means modified appropriately within the scopedefined by claims is included in the technical scope of the presentdisclosure as well.

INDUSTRIAL APPLICABILITY

The embodiments of the present disclosure can be preferably applied to avideo decoding apparatus that decodes coded data in which image data iscoded, and a video coding apparatus that generates coded data in whichimage data is coded. The embodiments of the present disclosure can bepreferably applied to a data structure of coded data generated by thevideo coding apparatus and referenced by the video decoding apparatus.

While preferred embodiments of the present invention have been describedabove, it is to be understood that variations and modifications will beapparent to those skilled in the art without departing from the scopeand spirit of the present invention. The scope of the present invention,therefore, is to be determined solely by the following claims.

1. A video decoding apparatus for decoding an encoded image, the videodecoding apparatus comprising: a matrix reference pixel derivationcircuitry that derives reference samples by using top neighboringsamples and left neighboring samples of a current block, wherein each ofthe top neighboring samples and left neighboring samples is derived byperforming a down-sampling process; a weight matrix derivation circuitrythat derives a weight matrix, which is defined by using a predictionsize, based on an intra prediction mode and a size index; a matrixprediction image derivation circuitry that derives a prediction image,which is defined by using the prediction size, by using a product-sumoperation using sample values in the reference samples and elements inthe weight matrix; and a matrix prediction image interpolation circuitrythat derives a predicted image by using the prediction image, wherein:the size index is derived according to a value of a target block widthand a value of a target block height, the prediction size is derivedusing the size index, and in a case that a first condition, that boththe value of the target block width and the value of the target blockheight are equal to 4, is true, the size index is set to 0 and theprediction size is equal to
 4. 2. The video decoding apparatus of claim1, wherein in a case that the first condition is false and in a casethat a second condition, that (i) either the value of the target blockwidth or the value of the target block height is equal to 4, or (ii)both the value of the target block width and the value of the targetblock height are equal to 8, is true, the size index is set to 1 and theprediction size is equal to
 4. 3. The video decoding apparatus of claim2, wherein in a case that the first condition is false and the secondcondition is false, the size index is set to 2 and the prediction sizeis equal to
 8. 4. The video decoding apparatus of claim 1, wherein theprediction image is defined as a square matrix.
 5. A video encodingapparatus for encoding an image data, the video encoding apparatuscomprising: a matrix reference pixel derivation circuitry that derivesreference samples by using top neighboring samples and left neighboringsamples of a current block, wherein each of the top neighboring samplesand left neighboring samples is derived by performing a down-samplingprocess; a weight matrix derivation circuitry that derives a weightmatrix, which is defined by using a prediction size, based on an intraprediction mode and a size index; a matrix prediction image derivationcircuitry that derives a prediction image, which is defined by using theprediction size, by using a product-sum operation using sample values inthe reference samples and elements in the weight matrix; and a matrixprediction image interpolation circuitry that derives a predicted imageby using the prediction image, wherein: the size index is derivedaccording to a value of a target block width and a value of a targetblock height, the prediction size is derived using the size index, andin a case that a first condition, that both the value of the targetblock width and the value of the target block height are equal to 4, istrue, the size index is set to 0 and the prediction size is equal to 4.6. A video decoding method for decoding an encoded image, the videodecoding method including: deriving reference samples by using topneighboring samples and left neighboring samples of a current block,wherein each of the top neighboring samples and left neighboring samplesis derived by performing a down-sampling process; deriving a weightmatrix, which is defined by using a prediction size, based on an intraprediction mode and a size index; deriving a prediction image, which isdefined by using the prediction size, by using a product-sum operationusing sample values in the reference samples and elements in the weightmatrix; and deriving a predicted image by using the prediction image,wherein: the size index is derived according to a value of a targetblock width and a value of a target block height, the prediction size isderived using the size index, and in a case that a first condition, thatboth the value of the target block width and the value of the targetblock height are equal to 4, is true, the size index is set to 0 and theprediction size is equal to 4.